
<?php

//print_r($com)."<br/><br/><br/><br/><br/>";
 echo $this->element('bbcode');
 if (isset($com['Board']['name']))
          echo "<span class='postTitle'>/".$com['Board']['name']."</span><br/>";
 if (isset($com['Board']['description']))
          echo $com['Board']['description'];

 echo "<br/><div style='padding-top:20px; padding-bottom:20px; clear:none; display:inline-block;'><a href='#'onclick='return showHide(this)'>New topic</a>";
 echo "<div style='display:none; padding:5px;'>";
 
 echo '<div id="smash1" style="display:inline-block; clear:none;">';
        echo $html->script('jquery-ui-1.8.14.custom.min', true);
	echo $html->script('jquery.fileUploader', true);
	echo $html->css('ui-lightness/jquery-ui-1.8.14.custom', null, array(), true);
	echo $html->css('fileUploader', null, array(), true);
		echo $this->Form->create('Attachment', array('action'=> 'add', 'type' => 'file'));
		echo $this->Form->input('file', array(
			'type' => 'file', 
			'label' => false, 'div' => false,
			'class' => 'fileUpload', 
			'multiple' => 'multiple',
                        'onclick' => 'return setTextual(this)'
		));		
		echo $this->Form->button('Upload', array('type' => 'submit', 'id' => 'px-submit', 'style'=> 'display:none'));
		echo $this->Form->button('Clear', array('type' => 'reset', 'id' => 'px-clear'));
		echo $form->end();

echo "</div>";
echo $this->Form->create('Post', array('action'=>'add', 'id'=>'addPost'));

echo $form->input(
        'Board.id', 
        array('type'=>'hidden', 'id'=>'boardId', 'value' => $com['Board']['id']));
echo $this->Form->input('title');
echo $this->Form->input('name');
echo $this->Form->input('body', array('rows' => '6', 'id'=>'texting'));
echo $this->Form->end('New Topic');
echo "</div></div>";


echo '<div class="input select boardChange">';
echo $this->Form->checkbox('p', array('checked'=>true,'hiddenField'=>false, 'label'=>'hi'))." Post Text  ";
echo $this->Form->checkbox('c', array('checked'=>true,'hiddenField'=>false))." Top Comments  ";
echo '<select name="data[Board]" id="SortBoard" onchange="return onBoardChange('.$com['Board']['id'].', this)">
<option value="Post.created">date</option>
<option value="Post.up">popularity</option>
<option value="Post.created">best</option>
</select></div><br/>'; 

echo '<div id="posts">';
 echo $this->element("board");
echo '</div>';







?>